package com.room;

import java.util.List;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

@Dao
public interface UserDao {

    @Insert
    void save(User... user);

    @Query("select * from user")
    List<User> getAll();
//    LiveData<List<User>> getAll();

    @Delete
    void delect(User... user);

    @Update
    void update(User... user);

    @Query("delete from user")
    void clear();

}
